package com.stu.journal.controller;

import com.stu.journal.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("/test")
public class TestController {
    @Autowired
    StockService stockService;


    @GetMapping("/stable")
    public String stable() {
        // 从数据库中获取订单信
        return "test1";
    }

    @GetMapping("/stock")
    public String stock() {
        var stock = stockService.getPriceString();
        // 从数据库中获取订单信
        return stock;
    }


}
